﻿<extend name="Public:office" />
<block name="title"><title>项目概览</title></block>
<block name="header_styles">
    <style type="text/css">
        .main-wrapper .container {
            background-color: #ffffff;
        }
    </style>
</block>
<block name="main">
    <div class="tabs-wrapper">
        <include file='Task:menu' />
        <div class="tab-content">
            <div class="tab-pane active" style="min-height: 600px;">
                <div>
                    <div class="task-progress">
                        <div class="progress-head">
                            项目总进度
                        </div>
                        <div class="task-columns">
                            <div class="task-column"><span class="task-tag">待认领</span>  {$taskTotal[1].count}</div>
                            <div class="task-column"><span class="task-tag">进行中</span>  {$taskTotal[2].count}</div>
                            <div class="task-column"><span class="task-tag">已提交</span>  {$taskTotal[3].count}</div>
                            <div class="task-column"><span class="task-tag">已验收</span>  {$taskTotal[4].count}</div>
                        </div>
                    </div>
                    <div class="task-progress"><!-- 待认领 begin-->
                        <div class="progress-head">待认领</div>
                        <dl class="dl-progress">
                            <dt>{$deptaskList[1]['expend']['mon']}</dt>
                            <volist name="deptaskList[1]['expend']['list']" id="mtask">
                                <dd>
                                    <span class="task-title">{$mtask.content}</span>
                                    <span class="user-name">{$mtask.rolename}</span>
                                </dd>
                            </volist>
                            <dt>历史归档</dt>
                            <foreach name="deptaskList[1]['ar']" item="mar" key="ym">
                                <dd>
                                    {$ym} <a href="javascript:void(0);" class="button-plus">+</a>
                                    <table style="display: none;">
                                        <volist name='mar' id='mt'>
                                            <tr>
                                                <td>{$mt.content}</td>
                                                <td style="width: 50px">{$mt.rolename}</td>
                                                <td style="width: 100px">{$mt.deadline}</td>
                                            </tr>
                                        </volist>
                                    </table>
                                </dd>
                            </foreach>
                        </dl>
                    </div><!-- 待认领 end-->
                    <div class="task-progress"><!-- 进行中 begin-->
                        <div class="progress-head">进行中</div>
                        <dl class="dl-progress">
                            <dt>{$deptaskList[2]['expend']['mon']}</dt>
                            <volist name="deptaskList[2]['expend']['list']" id="mtask">
                                <dd>
                                    <span class="task-title">{$mtask.content}</span>
                                    <span class="user-name">{$mtask.rolename}</span>
                                </dd>
                            </volist>
                            <dt>历史归档</dt>
                            <foreach name="deptaskList[2]['ar']" item="mar" key="ym">
                                <dd>
                                    {$ym} <a href="javascript:void(0);" class="button-plus">+</a>
                                    <table style="display: none;">
                                        <volist name='mar' id='mt'>
                                            <tr>
                                                <td>{$mt.content}</td>
                                                <td style="width: 50px">{$mt.rolename}</td>
                                                <td style="width: 100px">{$mt.deadline}</td>
                                            </tr>
                                        </volist>
                                    </table>
                                </dd>
                            </foreach>
                        </dl>
                    </div><!-- 进行中 end-->
                    <div class="task-progress"><!-- 已完成 begin-->
                        <div class="progress-head">已完成</div>
                        <dl class="dl-progress">
                            <dt>{$deptaskList[3]['expend']['mon']}</dt>
                            <volist name="deptaskList[3]['expend']['list']" id="mtask">
                                <dd>
                                    <span class="task-title">{$mtask.content}</span>
                                    <span class="user-name">{$mtask.rolename}</span>
                                </dd>
                            </volist>
                            <dt>历史归档</dt>
                            <foreach name="deptaskList[3]['ar']" item="mar" key="ym">
                                <dd>
                                    {$ym} <a href="javascript:void(0);" class="button-plus">+</a>
                                    <table style="display: none;">
                                        <volist name='mar' id='mt'>
                                            <tr>
                                                <td>{$mt.content}</td>
                                                <td style="width: 50px">{$mt.rolename}</td>
                                                <td style="width: 100px">{$mt.deadline}</td>
                                            </tr>
                                        </volist>
                                    </table>
                                </dd>
                            </foreach>
                        </dl>
                    </div><!-- 已完成 end-->
                    <div class="task-progress"><!-- 已验收 begin-->
                        <div class="progress-head">已验收</div>
                        <dl class="dl-progress">
                            <dt>{$deptaskList[4]['expend']['mon']}</dt>
                            <volist name="deptaskList[4]['expend']['list']" id="mtask">
                                <dd>
                                    <span class="task-title">{$mtask.content}</span>
                                    <span class="user-name">{$mtask.rolename}</span>
                                </dd>
                            </volist>
                            <dt>历史归档</dt>
                            <foreach name="deptaskList[4]['ar']" item="mar" key="ym">
                                <dd>
                                    {$ym} <a href="javascript:void(0);" class="button-plus">+</a>
                                    <table style="display: none;">
                                        <volist name='mar' id='mt'>
                                            <tr>
                                                <td>{$mt.content}</td>
                                                <td style="width: 50px">{$mt.rolename}</td>
                                                <td style="width: 100px">{$mt.deadline}</td>
                                            </tr>
                                        </volist>
                                    </table>
                                </dd>
                            </foreach>
                        </dl>
                    </div><!-- 已验收 end-->
                </div>
            </div>
        </div>
    </div>
</block>
<block name="footer_scripts">
    <script type="text/javascript">
        require(["jquery"], function($){
            $(function () {
                $(".dl-progress .button-plus").click(function () {
                    if ($(this).text() == "-") {
                        $(this).text("+");
                    } else {
                        $(this).text("-");
                    }
                    $(this).closest("dd").children("table").toggle();
                });
            });
        });
    </script>
</block>
